package com.acme.annotation;

/**
 * @author Alexander Kotov (kotov.alex.22@gmail.com)
 */

public class AppClient {
    public static void main(final String[] args) {
        ClientDao clientDao = new ClientDaoImpl();
        Client client = new Client();
        System.out.println("these 2 methods will be called out of transactions");
        clientDao.add(client);
        clientDao.update(client);

        ClientDao proxy = (ClientDao) TransactionManager.applyTransactionDemarcation(clientDao);
        System.out.println("these 2 methods will be called out of transactions");
        proxy.add(client);
        proxy.update(client);

    }
}
